using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LayersandTableViews
{
    /// <summary>
    /// <para>Select Layer By Location</para>
    /// <para>Selects features  based on a spatial relationship to features in another dataset.</para>
    /// <para>根据与另一个数据集中要素的空间关系来选择要素。</para>
    /// </summary>    
    [DisplayName("Select Layer By Location")]
    public class SelectLayerByLocation : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SelectLayerByLocation()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_layer">
        /// <para>Input Features</para>
        /// <para>The features that will be evaluated against the Selecting Features parameter values. The selection will be applied to these features.</para>
        /// <para>将根据选择要素参数值进行评估的要素。所选内容将应用于这些功能。</para>
        /// </param>
        public SelectLayerByLocation(List<object> _in_layer)
        {
            this._in_layer = _in_layer;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Select Layer By Location";

        public override string CallName => "management.SelectLayerByLocation";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_in_layer, _overlap_type.GetGPValue(), _select_features, _search_distance, _selection_type.GetGPValue(), _out_layer_or_view, _invert_spatial_relationship.GetGPValue(), _out_layers_or_views, _count];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features that will be evaluated against the Selecting Features parameter values. The selection will be applied to these features.</para>
        /// <para>将根据选择要素参数值进行评估的要素。所选内容将应用于这些功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_layer { get; set; }


        /// <summary>
        /// <para>Relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies the spatial relationship to be evaluated.</para>
        ///   <bulletList>
        ///     <bullet_item>Intersect—The features in the input layer will be selected if they intersect a selecting feature. This is the default.</bullet_item><para/>
        ///     <bullet_item>Intersect 3D—The features in the input layer will be selected if they intersect a selecting feature in three-dimensional space (x, y, and z).</bullet_item><para/>
        ///     <bullet_item>Intersect (DBMS)—The features in the input layer will be selected if they intersect a selecting feature. This option applies to enterprise geodatabases only. The selection will be processed in the enterprise geodatabase DBMS rather than on the client when all requirements are met (see more information in the usage notes). This option may provide better performance than performing the selection on the client.</bullet_item><para/>
        ///     <bullet_item>Within a distance—The features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.</bullet_item><para/>
        ///     <bullet_item>Within a distance 3D—The features in the input layer will be selected if they are within a specified distance of a selecting feature in three-dimensional space. Use the Search Distance parameter to specify the distance.</bullet_item><para/>
        ///     <bullet_item>Within a distance geodesic—The features in the input layer will be selected if they are within a specified distance of a selecting feature. Distance between features will be calculated using a geodesic formula that takes into account the curvature of the spheroid and correctly handles data near and across the dateline and poles. Use the Search Distance parameter to specify the distance.</bullet_item><para/>
        ///     <bullet_item>Contains—The features in the input layer will be selected if they contain a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Completely contains—The features in the input layer will be selected if they completely contain a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Contains Clementini—This spatial relationship yields the same results as Completely contains with the exception that if the selecting feature is entirely on the boundary of the input feature (no part is properly inside or outside), the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</bullet_item><para/>
        ///     <bullet_item>Within—The features in the input layer will be selected if they are within a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Completely within—The features in the input layer will be selected if they are completely within or contained by a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Within Clementini—The result will be identical to Within with the exception that if the entirety of the feature in the input layer is on the boundary of the feature in the selecting layer, the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</bullet_item><para/>
        ///     <bullet_item>Are identical to—The features in the input layer will be selected if they are identical (in geometry) to a selecting feature.</bullet_item><para/>
        ///     <bullet_item>Boundary touches—The features in the input layer will be selected if they have a boundary that touches a selecting feature. When the input features are lines or polygons, the boundary of the input feature can only touch the boundary of the selecting feature, and no part of the input feature can cross the boundary of the selecting feature.</bullet_item><para/>
        ///     <bullet_item>Share a line segment with—The features in the input layer will be selected if they share a line segment with a selecting feature. The input and selecting features must be line or polygon.</bullet_item><para/>
        ///     <bullet_item>Crossed by the outline of—The features in the input layer will be selected if they are crossed by the outline of a selecting feature. The input and selecting features must be lines or polygons. If polygons are used for the input or selecting layer, the polygon's boundary (line) will be used. Lines that cross at a point will be selected; lines that share a line segment will not be selected.</bullet_item><para/>
        ///     <bullet_item>Have their center in—The features in the input layer will be selected if their center falls within a selecting feature. The center of the feature is calculated as follows: for polygon and multipoint, the geometry's centroid is used; for line input, the geometry's midpoint is used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要评估的空间关系。</para>
        ///   <bulletList>
        ///     <bullet_item>相交—如果输入图层中的要素与选择要素相交，则将选择这些要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>相交 3D—如果输入图层中的要素与三维空间（x、y 和 z）中的选择要素相交，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>相交 （DBMS）—如果输入图层中的要素与选择要素相交，则将选择这些要素。此选项仅适用于企业级地理数据库。当满足所有要求时，将在企业级地理数据库 DBMS 中处理选择，而不是在客户端上处理（有关详细信息，请参阅使用说明）。此选项可能比在客户端上执行选择提供更好的性能。</bullet_item><para/>
        ///     <bullet_item>在距离内 - 如果输入图层中的要素位于选择要素的指定距离（使用欧几里得距离）内，则将选择这些要素。使用搜索距离参数指定距离。</bullet_item><para/>
        ///     <bullet_item>在距离内 3D - 如果输入图层中的要素位于三维空间中选择要素的指定距离内，则将选择这些要素。使用搜索距离参数指定距离。</bullet_item><para/>
        ///     <bullet_item>在距离测地线内 - 如果输入图层中的要素位于选择要素的指定距离内，则将选择这些要素。要素之间的距离将使用测地线公式计算，该公式考虑了椭球体的曲率，并正确处理了日期变更线和极点附近和跨日期变更线和极点的数据。使用搜索距离参数指定距离。</bullet_item><para/>
        ///     <bullet_item>包含—如果输入图层中的要素包含选择要素，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>完全包含—如果输入图层中的要素完全包含选择要素，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>包含 Clementini - 此空间关系产生的结果与“完全包含”相同，但以下情况除外：如果选择要素完全位于输入要素的边界上（没有零件位于内部或外部），则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</bullet_item><para/>
        ///     <bullet_item>内 - 如果输入图层中的要素位于选择要素内，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>完全在内—如果输入图层中的要素完全位于选择要素内或被选择要素所包含，则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>在 Clementini 中 - 结果将与 Within 相同，但以下情况除外：如果输入图层中的整个要素位于选择图层中要素的边界上，则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</bullet_item><para/>
        ///     <bullet_item>相同于—如果输入图层中的要素与选择要素相同（几何中），则将选择这些要素。</bullet_item><para/>
        ///     <bullet_item>边界接触 - 如果输入图层中的要素具有与选择要素相接触的边界，则将选择这些要素。当输入要素为直线或面时，输入要素的边界只能与选择要素的边界接触，输入要素的任何部分都不能越过选择要素的边界。</bullet_item><para/>
        ///     <bullet_item>共享线段 - 如果输入图层中的要素与选择要素共享线段，则将选择这些要素。输入要素和选择要素必须为直线或面。</bullet_item><para/>
        ///     <bullet_item>与轮廓相交 - 如果输入图层中的要素与所选要素的轮廓相交，则将选择这些要素。输入要素和选择要素必须为直线或面。如果将面用于输入图层或选择图层，则将使用面的边界（线）。将选择在某个点交叉的线;不会选择共享线段的线。</bullet_item><para/>
        ///     <bullet_item>中心位于输入图层中 - 如果输入图层中的要素中心位于选择要素内，则将选择输入图层中的要素。要素的中心计算如下：对于面和多点，使用几何的质心;对于线输入，使用几何图形的中点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Relationship")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _overlap_type_value _overlap_type { get; set; } = _overlap_type_value._INTERSECT;

        public enum _overlap_type_value
        {
            /// <summary>
            /// <para>Intersect</para>
            /// <para>Intersect—The features in the input layer will be selected if they intersect a selecting feature. This is the default.</para>
            /// <para>相交—如果输入图层中的要素与选择要素相交，则将选择这些要素。这是默认设置。</para>
            /// </summary>
            [Description("Intersect")]
            [GPEnumValue("INTERSECT")]
            _INTERSECT,

            /// <summary>
            /// <para>Intersect 3D</para>
            /// <para>Intersect 3D—The features in the input layer will be selected if they intersect a selecting feature in three-dimensional space (x, y, and z).</para>
            /// <para>相交 3D—如果输入图层中的要素与三维空间（x、y 和 z）中的选择要素相交，则将选择这些要素。</para>
            /// </summary>
            [Description("Intersect 3D")]
            [GPEnumValue("INTERSECT_3D")]
            _INTERSECT_3D,

            /// <summary>
            /// <para>Intersect (DBMS)</para>
            /// <para>Intersect (DBMS)—The features in the input layer will be selected if they intersect a selecting feature. This option applies to enterprise geodatabases only. The selection will be processed in the enterprise geodatabase DBMS rather than on the client when all requirements are met (see more information in the usage notes). This option may provide better performance than performing the selection on the client.</para>
            /// <para>相交 （DBMS）—如果输入图层中的要素与选择要素相交，则将选择这些要素。此选项仅适用于企业级地理数据库。当满足所有要求时，将在企业级地理数据库 DBMS 中处理选择，而不是在客户端上处理（有关详细信息，请参阅使用说明）。此选项可能比在客户端上执行选择提供更好的性能。</para>
            /// </summary>
            [Description("Intersect (DBMS)")]
            [GPEnumValue("INTERSECT_DBMS")]
            _INTERSECT_DBMS,

            /// <summary>
            /// <para>Within a distance geodesic</para>
            /// <para>Within a distance geodesic—The features in the input layer will be selected if they are within a specified distance of a selecting feature. Distance between features will be calculated using a geodesic formula that takes into account the curvature of the spheroid and correctly handles data near and across the dateline and poles. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离测地线内 - 如果输入图层中的要素位于选择要素的指定距离内，则将选择这些要素。要素之间的距离将使用测地线公式计算，该公式考虑了椭球体的曲率，并正确处理了日期变更线和极点附近和跨日期变更线和极点的数据。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within a distance geodesic")]
            [GPEnumValue("WITHIN_A_DISTANCE_GEODESIC")]
            _WITHIN_A_DISTANCE_GEODESIC,

            /// <summary>
            /// <para>Within a distance</para>
            /// <para>Within a distance—The features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离内 - 如果输入图层中的要素位于选择要素的指定距离（使用欧几里得距离）内，则将选择这些要素。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within a distance")]
            [GPEnumValue("WITHIN_A_DISTANCE")]
            _WITHIN_A_DISTANCE,

            /// <summary>
            /// <para>Within a distance 3D</para>
            /// <para>Within a distance 3D—The features in the input layer will be selected if they are within a specified distance of a selecting feature in three-dimensional space. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离内 3D - 如果输入图层中的要素位于三维空间中选择要素的指定距离内，则将选择这些要素。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within a distance 3D")]
            [GPEnumValue("WITHIN_A_DISTANCE_3D")]
            _WITHIN_A_DISTANCE_3D,

            /// <summary>
            /// <para>Contains</para>
            /// <para>Contains—The features in the input layer will be selected if they contain a selecting feature.</para>
            /// <para>包含—如果输入图层中的要素包含选择要素，则将选择这些要素。</para>
            /// </summary>
            [Description("Contains")]
            [GPEnumValue("CONTAINS")]
            _CONTAINS,

            /// <summary>
            /// <para>Completely contains</para>
            /// <para>Completely contains—The features in the input layer will be selected if they completely contain a selecting feature.</para>
            /// <para>完全包含—如果输入图层中的要素完全包含选择要素，则将选择这些要素。</para>
            /// </summary>
            [Description("Completely contains")]
            [GPEnumValue("COMPLETELY_CONTAINS")]
            _COMPLETELY_CONTAINS,

            /// <summary>
            /// <para>Contains Clementini</para>
            /// <para>Contains Clementini—This spatial relationship yields the same results as Completely contains with the exception that if the selecting feature is entirely on the boundary of the input feature (no part is properly inside or outside), the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</para>
            /// <para>包含 Clementini - 此空间关系产生的结果与“完全包含”相同，但以下情况除外：如果选择要素完全位于输入要素的边界上（没有零件位于内部或外部），则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</para>
            /// </summary>
            [Description("Contains Clementini")]
            [GPEnumValue("CONTAINS_CLEMENTINI")]
            _CONTAINS_CLEMENTINI,

            /// <summary>
            /// <para>Within</para>
            /// <para>Within a distance—The features in the input layer will be selected if they are within the specified distance (using Euclidean distance) of a selecting feature. Use the Search Distance parameter to specify the distance.</para>
            /// <para>在距离内 - 如果输入图层中的要素位于选择要素的指定距离（使用欧几里得距离）内，则将选择这些要素。使用搜索距离参数指定距离。</para>
            /// </summary>
            [Description("Within")]
            [GPEnumValue("WITHIN")]
            _WITHIN,

            /// <summary>
            /// <para>Completely within</para>
            /// <para>Completely within—The features in the input layer will be selected if they are completely within or contained by a selecting feature.</para>
            /// <para>完全在内—如果输入图层中的要素完全位于选择要素内或被选择要素所包含，则将选择这些要素。</para>
            /// </summary>
            [Description("Completely within")]
            [GPEnumValue("COMPLETELY_WITHIN")]
            _COMPLETELY_WITHIN,

            /// <summary>
            /// <para>Within Clementini</para>
            /// <para>Within Clementini—The result will be identical to Within with the exception that if the entirety of the feature in the input layer is on the boundary of the feature in the selecting layer, the feature will not be selected. Clementini defines the boundary polygon as the line separating inside and outside, the boundary of a line is defined as its end points, and the boundary of a point is always empty.</para>
            /// <para>在 Clementini 中 - 结果将与 Within 相同，但以下情况除外：如果输入图层中的整个要素位于选择图层中要素的边界上，则不会选择该要素。克莱门蒂尼将边界多边形定义为分隔内部和外部的线，将线的边界定义为其端点，并且点的边界始终为空。</para>
            /// </summary>
            [Description("Within Clementini")]
            [GPEnumValue("WITHIN_CLEMENTINI")]
            _WITHIN_CLEMENTINI,

            /// <summary>
            /// <para>Are identical to</para>
            /// <para>Are identical to—The features in the input layer will be selected if they are identical (in geometry) to a selecting feature.</para>
            /// <para>相同于—如果输入图层中的要素与选择要素相同（几何中），则将选择这些要素。</para>
            /// </summary>
            [Description("Are identical to")]
            [GPEnumValue("ARE_IDENTICAL_TO")]
            _ARE_IDENTICAL_TO,

            /// <summary>
            /// <para>Boundary touches</para>
            /// <para>Boundary touches—The features in the input layer will be selected if they have a boundary that touches a selecting feature. When the input features are lines or polygons, the boundary of the input feature can only touch the boundary of the selecting feature, and no part of the input feature can cross the boundary of the selecting feature.</para>
            /// <para>边界接触 - 如果输入图层中的要素具有与选择要素相接触的边界，则将选择这些要素。当输入要素为直线或面时，输入要素的边界只能与选择要素的边界接触，输入要素的任何部分都不能越过选择要素的边界。</para>
            /// </summary>
            [Description("Boundary touches")]
            [GPEnumValue("BOUNDARY_TOUCHES")]
            _BOUNDARY_TOUCHES,

            /// <summary>
            /// <para>Share a line segment with</para>
            /// <para>Share a line segment with—The features in the input layer will be selected if they share a line segment with a selecting feature. The input and selecting features must be line or polygon.</para>
            /// <para>共享线段 - 如果输入图层中的要素与选择要素共享线段，则将选择这些要素。输入要素和选择要素必须为直线或面。</para>
            /// </summary>
            [Description("Share a line segment with")]
            [GPEnumValue("SHARE_A_LINE_SEGMENT_WITH")]
            _SHARE_A_LINE_SEGMENT_WITH,

            /// <summary>
            /// <para>Crossed by the outline of</para>
            /// <para>Crossed by the outline of—The features in the input layer will be selected if they are crossed by the outline of a selecting feature. The input and selecting features must be lines or polygons. If polygons are used for the input or selecting layer, the polygon's boundary (line) will be used. Lines that cross at a point will be selected; lines that share a line segment will not be selected.</para>
            /// <para>与轮廓相交 - 如果输入图层中的要素与所选要素的轮廓相交，则将选择这些要素。输入要素和选择要素必须为直线或面。如果将面用于输入图层或选择图层，则将使用面的边界（线）。将选择在某个点交叉的线;不会选择共享线段的线。</para>
            /// </summary>
            [Description("Crossed by the outline of")]
            [GPEnumValue("CROSSED_BY_THE_OUTLINE_OF")]
            _CROSSED_BY_THE_OUTLINE_OF,

            /// <summary>
            /// <para>Have their center in</para>
            /// <para>Have their center in—The features in the input layer will be selected if their center falls within a selecting feature. The center of the feature is calculated as follows: for polygon and multipoint, the geometry's centroid is used; for line input, the geometry's midpoint is used.</para>
            /// <para>中心位于输入图层中 - 如果输入图层中的要素中心位于选择要素内，则将选择输入图层中的要素。要素的中心计算如下：对于面和多点，使用几何的质心;对于线输入，使用几何图形的中点。</para>
            /// </summary>
            [Description("Have their center in")]
            [GPEnumValue("HAVE_THEIR_CENTER_IN")]
            _HAVE_THEIR_CENTER_IN,

        }

        /// <summary>
        /// <para>Selecting Features</para>
        /// <para>The features in the Input Features parameter will be selected based on their relationship to the features from this layer or feature class.</para>
        /// <para>输入要素参数中的要素将根据其与此图层或要素类中的要素的关系进行选择。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Selecting Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _select_features { get; set; } = null;


        /// <summary>
        /// <para>Search Distance</para>
        /// <para><xdoc>
        ///   <para>The distance that will be searched. This parameter is only valid if the Relationship parameter is set to Within a distance, Within a distance geodesic, Within a distance 3D, Intersect, Intersect 3D, Have their center in, or Contains.</para>
        ///   <para>If the Within a distance geodesic option is selected, use a linear unit such as kilometers or miles.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将搜索的距离。仅当“关系”参数设置为“在距离内”、“在距离测地线内”、“距离 3D 内”、“相交”、“相交 3D”、“有其中心”或“包含”时，此参数才有效。</para>
        ///   <para>如果选择了距离内测地线选项，请使用线性单位，例如千米或英里。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_distance { get; set; } = null;


        /// <summary>
        /// <para>Selection type</para>
        /// <para><xdoc>
        ///   <para>Specifies how the selection will be applied to the input and how it will be combined with an existing selection. This tool does not include an option to clear an existing selection; use the Clear the current selection option on the Select Layer By Attribute tool to do that.</para>
        ///   <bulletList>
        ///     <bullet_item>New selection—The resulting selection will replace any existing selection. This is the default.</bullet_item><para/>
        ///     <bullet_item>Add to the current selection—The resulting selection will be added to an existing selection. If no selection exists, this is the same as the New selection option.</bullet_item><para/>
        ///     <bullet_item>Remove from the current selection—The resulting selection will be removed from an existing selection. If no selection exists, the operation will have no effect.</bullet_item><para/>
        ///     <bullet_item>Select subset from the current selection—The resulting selection will be combined with the existing selection. Only records that are common to both remain selected.</bullet_item><para/>
        ///     <bullet_item>Switch the current selection—The selection will be switched. All records that were selected will be removed from the selection, and all records that were not selected will be added to the selection. The Selecting Features and Relationship parameters are ignored when this option is selected.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何将所选内容应用于输入以及如何将其与现有所选内容组合。此工具不包括清除现有选择的选项;使用“按属性选择图层”工具上的“清除当前选择”选项执行此操作。</para>
        ///   <bulletList>
        ///     <bullet_item>新选定内容 - 生成的选择内容将替换任何现有选择内容。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>添加到当前选区 - 生成的选区将添加到现有选区。如果不存在选择，则这与“新建选择”选项相同。</bullet_item><para/>
        ///     <bullet_item>从当前选区移除 - 生成的选区将从现有选区中移除。如果不存在任何选择，则该操作将不起作用。</bullet_item><para/>
        ///     <bullet_item>从当前选择中选择子集 - 生成的选择将与现有选择合并。只有两者共有的记录才会保持选中状态。</bullet_item><para/>
        ///     <bullet_item>切换当前选区 - 将切换选区。所有已选定的记录都将从选定内容中删除，所有未选定的记录都将添加到选定内容中。选择此选项时，将忽略“选择要素”和“关系”参数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Selection type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _selection_type_value _selection_type { get; set; } = _selection_type_value._NEW_SELECTION;

        public enum _selection_type_value
        {
            /// <summary>
            /// <para>New selection</para>
            /// <para>New selection—The resulting selection will replace any existing selection. This is the default.</para>
            /// <para>新选定内容 - 生成的选择内容将替换任何现有选择内容。这是默认设置。</para>
            /// </summary>
            [Description("New selection")]
            [GPEnumValue("NEW_SELECTION")]
            _NEW_SELECTION,

            /// <summary>
            /// <para>Add to the current selection</para>
            /// <para>Add to the current selection—The resulting selection will be added to an existing selection. If no selection exists, this is the same as the New selection option.</para>
            /// <para>添加到当前选区 - 生成的选区将添加到现有选区。如果不存在选择，则这与“新建选择”选项相同。</para>
            /// </summary>
            [Description("Add to the current selection")]
            [GPEnumValue("ADD_TO_SELECTION")]
            _ADD_TO_SELECTION,

            /// <summary>
            /// <para>Remove from the current selection</para>
            /// <para>Remove from the current selection—The resulting selection will be removed from an existing selection. If no selection exists, the operation will have no effect.</para>
            /// <para>从当前选区移除 - 生成的选区将从现有选区中移除。如果不存在任何选择，则该操作将不起作用。</para>
            /// </summary>
            [Description("Remove from the current selection")]
            [GPEnumValue("REMOVE_FROM_SELECTION")]
            _REMOVE_FROM_SELECTION,

            /// <summary>
            /// <para>Select subset from the current selection</para>
            /// <para>Select subset from the current selection—The resulting selection will be combined with the existing selection. Only records that are common to both remain selected.</para>
            /// <para>从当前选择中选择子集 - 生成的选择将与现有选择合并。只有两者共有的记录才会保持选中状态。</para>
            /// </summary>
            [Description("Select subset from the current selection")]
            [GPEnumValue("SUBSET_SELECTION")]
            _SUBSET_SELECTION,

            /// <summary>
            /// <para>Switch the current selection</para>
            /// <para>Switch the current selection—The selection will be switched. All records that were selected will be removed from the selection, and all records that were not selected will be added to the selection. The Selecting Features and Relationship parameters are ignored when this option is selected.</para>
            /// <para>切换当前选区 - 将切换选区。所有已选定的记录都将从选定内容中删除，所有未选定的记录都将添加到选定内容中。选择此选项时，将忽略“选择要素”和“关系”参数。</para>
            /// </summary>
            [Description("Switch the current selection")]
            [GPEnumValue("SWITCH_SELECTION")]
            _SWITCH_SELECTION,

        }

        /// <summary>
        /// <para>Layer With Selection</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Layer With Selection")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_layer_or_view { get; set; }


        /// <summary>
        /// <para>Invert spatial relationship</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the spatial relationship evaluation result or the opposite result will be used. For example, this parameter can be used to get a list of features that do not intersect or are not within a given distance of features in another dataset.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The query result will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The opposite of the query result will be used. If the Selection Type parameter is used, the reversal of the selection occurs before it is combined with existing selections.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是使用空间关系评估结果还是相反结果。例如，此参数可用于获取与另一个数据集中的要素不相交或不在给定距离内的要素列表。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 将使用查询结果。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 将使用与查询结果相反的查询结果。如果使用“选择类型”参数，则在将选择内容与现有选择组合之前，将发生选择的反转。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Invert spatial relationship")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _invert_spatial_relationship_value _invert_spatial_relationship { get; set; } = _invert_spatial_relationship_value._false;

        public enum _invert_spatial_relationship_value
        {
            /// <summary>
            /// <para>INVERT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INVERT")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NOT_INVERT</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NOT_INVERT")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Layer Names</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer Names")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _out_layers_or_views { get; set; }


        /// <summary>
        /// <para>Count</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Count")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public List<object> _count { get; set; }


        public SelectLayerByLocation SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}